package RozetkaTesting;

import RozetkaPages.HomePage;
import org.openqa.selenium.WebDriver;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeSuite;
import util.PropertyLoader;
import util.WebDriverFactory;


/**
 * Created by Yulia on 23.03.14.
 */
public abstract class BasicSetUp{

    WebDriver driver;

    @BeforeSuite
    public void setUp()
    {
        String browserName = PropertyLoader.loadProperty("browser.name");
        driver = new WebDriverFactory().initDriver(browserName);
    }

    @AfterSuite
    public void tearDown()
    {
        if(driver!=null)
            driver.quit();
    }

}

